import requests

#登录
# 请求方式：post
# 请求地址：http://10.59.9.14:7003/api/public/login
# 请求头：
# 请求体：{"username":"15985645484","password":"123456"}

scrpit_login = requests.post(url='http://10.59.9.14:7003/api/public/login',
                   json={"username": "15985645484", "password": "123456"})
print(scrpit_login.json())
#提取token
login_token = {'Auth-Token':'Bearer '+ scrpit_login.json()['data']['token']}
print(type(login_token))
print(login_token)
# 个人信息
scrpit_info = requests.get(url='http://10.59.9.14:7003/api/ucenter/info',headers=login_token)
print(scrpit_info.json())


